//
//  ToolTipText.swift
//  Trans
//
//  Created by zcj on 2024/12/9.
//

import SwiftUI

struct ToolTipText: View {
    @State var title:String = ""
    @State var isHover:Bool = false
    @State var titleColor = kcolors.textColor
    var body: some View {
        Button {
            
        } label: {
            Text(title).foregroundColor(kcolors.textColor)
        }
        .disabled(true)
        .onHover { bh in
            isHover = bh
        }
        .popover(isPresented: $isHover) {
            Text(title).padding(2)
        }
        .background(Color.clear)
        .buttonStyle(.plain)
        
    }
}

#Preview {
    ToolTipText(isHover: false)
}
